Skip to content

lib: introduce support for BOX records with header type6 #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025

Conversation

jlrivasp
Copy link
Contributor

@jlrivasp jlrivasp commented May 2, 2025

This patch includes decoding support for any box record type with a header type6. When a box record contains other records, these records inherit some values from the box header, one example is the presence of die_id and socket_id which are part of header type6.

@jlrivasp jlrivasp requested a review from psurply May 2, 2025 09:43
@jlrivasp jlrivasp force-pushed the dev/box_hdr_type6 branch from a92c566 to 0aa74d4 Compare May 2, 2025 09:50
}

impl Record {
pub fn update_inherited_header(&mut self, inherited_header: Option<InheritedHeader>) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we limit the visibility of this method to the crate (pub(crate))? I don't see a need to add this to the public API.

Also, since the fields of the struct are public, there is no real reason to encapsulate this logic in a method.

@jlrivasp jlrivasp force-pushed the dev/box_hdr_type6 branch from 0aa74d4 to 6cd4530 Compare May 6, 2025 17:23
Copy link
Contributor

@psurply psurply left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, it looks good to me. I just have a few comments.

@@ -35,6 +35,13 @@ impl Region {
}
}

pub(crate) fn update_socket_and_die(&mut self, socket_id: u8, die_id: u8) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can call this function set_socket_and_die_ids() instead

let record = Record {
header,
data,
..Record::default()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

..Default::default()

This patch includes decoding support for any box record type with a
header type6. When a box record contains other records, these records
inherit some values from the box header, one example is the presence of
`die_id` and `socket_id` which are part of header type6.

Signed-off-by: Rivas Paz, Jose L <jose.l.rivas.paz@intel.com>
@jlrivasp jlrivasp force-pushed the dev/box_hdr_type6 branch from 6cd4530 to f4e3b5c Compare May 7, 2025 07:02
Copy link
Contributor

@psurply psurply left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good to me now. Thank you for the PR!

@psurply psurply merged commit fb47fd2 into intel:main May 7, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants